import { NgModule, Component } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { TrafficManagementComponent } from './traffic-management.component';
import { TrafficAlertComponent } from './traffic-alert/traffic-alert.component';
import { TrafficAlertPageComponent } from './traffic-alert/traffic-alert-page/traffic-alert-page.component';
import { HistoricalAlertComponent } from './traffic-alert/historical-alert/historical-alert.component';
import { OperationalAlarmComponent } from './traffic-alert/operational-alarm/operational-alarm.component';
import { IncidentRecordComponent } from './incident-record/incident-record.component';
import { IncidentRecordListComponent } from './incident-record/incident-record-list/incident-record-list.component';
import { IrHistoryListComponent } from './incident-record/ir-history-list/ir-history-list.component';
import { IrInfoDetailComponent } from './incident-record/ir-info-detail/ir-info-detail.component';
import { ResponsePlanComponent } from './incident-record/response-plan/response-plan.component';
import { IncidentLogsComponent } from './incident-logs/incident-logs.component';
import { RouterModule, Routes } from '@angular/router';
import { NgZorroAntdModule } from 'ng-zorro-antd';
import { PublicComponentModule } from '../../public/public-component.module';
import { ShareModule } from 'app/shared/ShareModule';
import { ScheduledEventComponent } from './scheduled-event/scheduled-event.component';
import { IrRecordListComponent } from './scheduled-event/ir-record-list/ir-record-list.component';
import { IrInfoDetailsComponent } from './scheduled-event/ir-info-details/ir-info-details.component';
import { HistScheduledEventComponent } from './scheduled-event/hist-scheduled-event/hist-scheduled-event.component';
import { IrInfoCreateComponent } from './traffic-alert/ir-info-detail/ir-info-detail.component';
import { PlanTemplateComponent } from './incident-record/plan-template/plan-template.component';
import { PlanLibraryComponent } from './incident-record/plan-library/plan-library.component';
import { PlanMsgInfoComponent } from './incident-record/plan-msg-info/plan-msg-info.component';
import { PlanPreviewImgComponent } from './incident-record/plan-preview-img/plan-preview-img.component';
const COMPONENT = [
    TrafficManagementComponent,
    TrafficAlertComponent,
    IncidentRecordComponent,
    IncidentLogsComponent,
    IncidentRecordListComponent,
    IrHistoryListComponent,
    TrafficAlertPageComponent,
    HistoricalAlertComponent,
    OperationalAlarmComponent,
    IrInfoDetailComponent,
    ResponsePlanComponent,
    ScheduledEventComponent,
    IrRecordListComponent,
    IrInfoDetailsComponent,
    HistScheduledEventComponent,
    IrInfoCreateComponent,
    PlanTemplateComponent,
    PlanLibraryComponent,
    PlanMsgInfoComponent,
    PlanPreviewImgComponent
];

const routes: Routes = [
    {
        path: '',
        component: TrafficManagementComponent,
        children: [
            { path: '', redirectTo: 'traffic-alert-page', pathMatch: 'full' },
            { path: 'traffic-alert-page', component: TrafficAlertComponent },
            { path: 'incident-record', component: IncidentRecordComponent },
            { path: 'incident-logs', component: IncidentLogsComponent },
            { path: 'scheduled-event', component: ScheduledEventComponent }
        ]
    }
];

@NgModule({
    imports: [ShareModule, NgZorroAntdModule, FormsModule, ReactiveFormsModule, PublicComponentModule, RouterModule.forChild(routes)],
    declarations: COMPONENT,
    entryComponents: [PlanTemplateComponent]
})
export class TrafficManagementModule {}
